package com.sxx.beautifulcity.database;

import com.sxx.beautifulcity.entity.greendao.AroundDaoEntity;
import com.sxx.beautifulcity.entity.greendao.AroundDaoEntityDao;

import java.util.List;

/**
 * Created by dllo on 15/11/2.
 */
public class AroundHelper {

    private DaoSingleton instance = DaoSingleton.getInstance();
    private AroundDaoEntityDao aroundDao;

    public AroundHelper() {
        this.aroundDao = instance.getAroundDao();
    }

    public void saveAroundList(List<AroundDaoEntity> entityDaos){
        aroundDao.insertInTx(entityDaos);
    }

    public void deleteAroundList(List<AroundDaoEntity> datas){
        aroundDao.deleteAll();
    }
    public List<AroundDaoEntity> queryAll(){
        return aroundDao.loadAll();
    }
}
